<?php
	$current = 54;
	require_once 'includes/global.inc.php';
	$success = false;
	$message = NULL;
	$List = new ListTools();
	//$LastID = $List->LastID(1);
	$LastID = 1;
	$o_id = "";
	$o_date = "";
	
	if(isset($_POST['submit-form'])) {
		$o_date = strtotime("now");
		$success = true;
	}else{
		$success = false;
	}
	//initialize variables for form validation
	if(isset($_POST['item'])) {
		/*	$item = $_POST['item'];
		$status = $_POST['status'];
		$i=0;
											
										
		while(isset($item[$i])){
			$query = "INSERT INTO  `laundrybox`.`item` (`i_id` ,`i_itemcode` ,`i_invoice`)
						VALUES (NULL ,  '1',  '1')";
			}
			$i = $i +1;*/
		}
	
	if($success)
	{
		
	    //Message
	    $message = "<div class=\"widget_content\">
				<div class=\"msg success\">
                    <span>New Invoice Generated</span>
                    <a href=\"#\" class=\"close\">x</a>
                </div>
				</div>";
	}
?>
<!doctype html>
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
	<title>Order - Laundry Box</title>
	<meta charset="UTF-8">
	<meta name="description" content="">
	<meta name="author" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	
	<link rel="shortcut icon" href="#">

<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" href="css/colors.css">
	<link rel="stylesheet" href="css/jquery.tipsy.css">
	<link rel="stylesheet" href="css/jquery.wysiwyg.css">
	<link rel="stylesheet" href="css/jquery.datatables.css">
	<link rel="stylesheet" href="css/jquery.nyromodal.css">
	<link rel="stylesheet" href="css/jquery.datepicker.css">
	<link rel="stylesheet" href="css/jquery.fileinput.css">
	<link rel="stylesheet" href="css/jquery.fullcalendar.css">
	<link rel="stylesheet" href="css/jquery.visualize.css">

<script type="text/javascript" src="http://ajax.googleapis.com/
ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/reCopy.js"></script>
<script type="text/javascript">
$(function(){
  var removeLink = ' <a class="remove" href="#" onclick="$(this).parent().slideUp(function(){ $(this).remove() }); return false">remove</a>';
$('a.add').relCopy({ append: removeLink});	
});
</script>

</head>

<!-- Add class .fixed for fixed layout. You would need also edit CSS file for width -->
<body>

	<!-- Fixed Layout Wrapper -->
	<div class="fixed-wraper">

	<?php 
		include('module/leftside.php');
	?>
	
	<!-- Main Content -->
	<section role="main">
	
		
		<!-- Breadcumbs -->
		<ul id="breadcrumbs">
			<li><a href="#" title="Back to Homepage">Back to Home</a></li>
			<li><a href="#">Admin Panel</a></li>
			<li><a href="#">Order</a></li>
			<li><a href="#">New Order</a></li>
			<li>Current Page</li>
		</ul>
		<!-- /Breadcumbs -->
		
		<!-- Full Content Block -->
		<!-- Note that only 1st article need clearfix class for clearing -->
		<article class="full-block clearfix">
		
			<!-- Article Container for safe floating -->
			<div class="article-container">
			
				<!-- Article Header -->
				<header>
					<h2>Laundry Box Admin Panel</h2>
					<!-- Article Header Tab Navigation -->
					<nav>
						<ul class="tab-switch">
							<li><a class="default-tab" href="#tab0" rel="tooltip" title="Switch to next tab">Graphs</a></li>
							<li><a href="#tab1" rel="tooltip" title="Switch to next tab">Basic Typo</a></li>
							<li><a href="#tab2" rel="tooltip" title="Switch to next tab">Table and form</a></li>
						</ul>
					</nav>
					<!-- /Article Header Tab Navigation -->
				</header>
				<!-- /Article Header -->
				
				<!-- Article Content -->
				<section>
				
					<!-- Tab Content #tab0 -->
					<div class="tab default-tab" id="tab0">
						<h3>New Order</h3>
						<form action="order.php" method="POST">
								<!-- Inputs -->
								<!-- Use class .small, .medium or .large for predefined size -->
								<fieldset>
									<legend>Order Form</legend>
									<dl>
										<dt>
											<label>Order No.</label>
										</dt>
										<dd>
											<input type="text" class="" disabled="disabled" value="<?php echo $LastID;?>">
										</dd>
										<dt>
											<label>Item</label>
										</dt>
										<dd><p class="clone">
											<input type="text" class="input" name="item[]" autocomplete="off">
											<select name="status[]">
												<option selected>Choose an action</option>
												<option value="Normal Wash">Normal Wash</option>
												<option value="Dry Clean">Dry Clean</option>
												<option value="Iron">Iron</option>
											</select>
											</p>
										</dd>
										
										<dt>
											<label> </label>
										</dt>
										<dd>
											<p>&nbsp;<p><a href="#" class="add" rel=".clone">Add More</a></p>
										</dd><!--
										<dt>
											<label>Remarks</label>
										</dt>
										<dd>
											 Use class .wysiwyg for jQuery jWYSIWYG initiation 
											<textarea rows="5" cols="40" class="wysiwyg large">Under Construction</textarea>
											<p>Short description of event</p>
										</dd>-->
									</dl>
								</fieldset>
								<fieldset>
									<legend>Asign To</legend>
									<dl>
										<dt><label>Asign User</label></dt>
										<dd>
											<select name="asign">
												<option selected>Choose a user</option>
												<option value="1">Rose</option>
												<option value="2">Ali</option>
												<option value="3">Daniel</option>
											</select>
										</dd>
										<p>
										<?php 
											/*
											if(isset($_POST['item'])) {
											$item = $_POST['item'];
											$status = $_POST['status'];
											$i=0;
											
											
											while(isset($item[$i]))
											{
												echo $item[$i]." ".$status[$i]."<br>";
												$i = $i +1;
											}
											}*/
										?>
									</dl>
								</fieldset>
								<input type="text" hidden="hidden" name="submit-form" value="Create"/>
								<button type="submit">Submit</button> or <a href="#">Cancel</a>
							</form>

					</div>
					<!-- /Tab Content #tab0 -->
				
					
				</section>
				<!-- /Article Content -->
				
				<!-- Article Footer -->
				<footer>
					<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et <a href="#sample" class="open-modal">open modal!</a> Maecenas id augue ac metus tempus aliquam. Sed pharetra placerat suscipit sagittis.</p>
				</footer>
				<!-- /Article Footer -->
			
			</div>
			<!-- /Article Container -->
			
		</article>
		<!-- /Full Content Block -->
		
		<!-- Full Content Block with .nested style -->
		<article class="full-block nested">
		
			
		
		</article>
		<!-- /Full Content Block with .nested style -->
		
		<div class="clearfix"></div> <!-- We're really sorry for this, but because of IE7 we still need separated div with clearfix -->
		
	
	</section>
	<!-- /Main Content -->
	
	</div>
	<!-- /Fixed Layout Wrapper -->

	<!-- JS Libs at the end for faster loading -->
	<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>-->
	<script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery/jquery-1.5.1.min.js"%3E%3C/script%3E'))</script>
	<script src="js/libs/selectivizr.js"></script>
	<script src="js/jquery/jquery.nyromodal.js"></script>
	<script src="js/jquery/jquery.tipsy.js"></script>
	<script src="js/jquery/jquery.wysiwyg.js"></script>
	<script src="js/jquery/jquery.datatables.js"></script>
	<script src="js/jquery/jquery.datepicker.js"></script>
	<script src="js/jquery/jquery.fileinput.js"></script>
	<script src="js/jquery/jquery.fullcalendar.min.js"></script>
	<script src="js/jquery/excanvas.js"></script>
	<script src="js/jquery/jquery.visualize.js"></script>
	<script src="js/jquery/jquery.visualize.tooltip.js"></script>
	<script src="js/script.js"></script>
</body>
</html>